package pb

import (
	"context"
	"go_end/internal/service"

	"go_end/api/pb/v1"
)

func (c *ControllerV1) GetDataList(ctx context.Context, req *v1.GetDataListReq) (res *v1.GetDataListRes, err error) {
	data := service.Pb().GetPbData(ctx)

	list := service.Pb().ParseList(ctx, data)

	res = new(v1.GetDataListRes)

	res.List = list

	return res, nil
}
